from abc import ABC, abstractmethod

class BaseTTS(ABC):
    """
    Abstract base class for all Text-to-Speech (TTS) services.
    """
    @abstractmethod
    async def save(self, text, output_file, voice):
        """
        Saves a single text snippet to an audio file.
        This is an asynchronous method.

        :param text: The text to be converted.
        :param output_file: The file path to save the audio.
        :param voice: The voice/sound identifier to use.
        :raises: Exception if the conversion fails.
        """
        pass

    @staticmethod
    @abstractmethod
    def get_name():
        """
        Returns the name of the TTS service for display in the UI.
        """
        pass

    @staticmethod
    @abstractmethod
    async def get_voices():
        """
        Asynchronously retrieves and returns a list of supported voices.
        """
        pass